Commit 39d4d713 authored by T.J. Corona's avatar T.J. Corona Committed by Kitware Robot

Merge topic 'export-hacks'

f44c1371 Some less-than-reputable changes to improve export LaF
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Reviewed-by: John Tourtellott's avatarJohn Tourtellott <john.tourtellott@kitware.com>
Merge-request: !1334
parents 6d850dcf f44c1371
Pipeline #123014 failed with stage
in 0 seconds
......@@ -119,6 +119,11 @@ void pqExportSimulationReaction::exportSimulation()
exportDialog->setObjectName("SimulationExportDialog");
exportDialog->setWindowTitle("Simulation Export Dialog");
exportDialog->setLayout(new QVBoxLayout(exportDialog.data()));
// TODO: the dialog size should not be set this way. It should auto-expand
// to accommodate the contained opView. Either Qt is being coy, or smtk's
// qtBaseView logic for resizing doesn't inform the containing parent of its
// decisions.
exportDialog->resize(600, 300);
// Create a new UI for the dialog.
QSharedPointer<smtk::extension::qtUIManager> uiManager =
......@@ -130,6 +135,8 @@ void pqExportSimulationReaction::exportSimulation()
smtk::extension::qtOperationView* opView = dynamic_cast<smtk::extension::qtOperationView*>(
uiManager->setSMTKView(view, exportDialog.data()));
exportDialog->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
// Alert the user if the operation fails. Close the dialog if the operation
// succeeds.
connect(opView, &smtk::extension::qtOperationView::operationExecuted,
......
......@@ -129,6 +129,10 @@ std::string qtResourceItem::synopsis(bool& ok) const
std::string locn = resource->location();
std::string file = smtk::common::Paths::filename(locn);
std::string dir = smtk::common::Paths::directory(locn);
if (dir.size() > 31)
{
dir = dir.substr(0, 14) + "..." + dir.substr(dir.size() - 14, 14);
}
std::string name = dir.empty() ? "New Resource" : (file + " (" + dir + ")");
label << (numSel == 1 ? (resource ? name : "NULL!!") : (numSel > 0 ? "too many" : "(none)"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment