Fix late repaint of secondary views
- when ScaleType=Automatic and Scale changes individual views were not being repainted until next document recompute.
This commit is contained in:
@@ -229,10 +229,19 @@ void TaskProjGroup::scaleTypeChanged(int index)
|
||||
, "Page");
|
||||
} else if(index == 1) {
|
||||
// Automatic Scale Type
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().%s.ScaleType = '%s'", multiView->getNameInDocument()
|
||||
, "Automatic");
|
||||
// Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().%s.ScaleType = '%s'", multiView->getNameInDocument()
|
||||
// , "Automatic");
|
||||
// Base::Console().Message("TRACE - TPG::scaleTypeChanged - Auto\n");
|
||||
//block recompute
|
||||
multiView->ScaleType.setValue("Automatic");
|
||||
double autoScale = multiView->calculateAutomaticScale();
|
||||
multiView->Scale.setValue(autoScale);
|
||||
//unblock recompute
|
||||
// Base::Console().Message("TRACE - TPG::scaleTypeChanged - autoScale: %.3f\n",autoScale);
|
||||
|
||||
} else if(index == 2) {
|
||||
// Custom Scale Type
|
||||
//block recompute
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().%s.ScaleType = '%s'", multiView->getNameInDocument()
|
||||
, "Custom");
|
||||
ui->sbScaleNum->setEnabled(true);
|
||||
@@ -243,6 +252,7 @@ void TaskProjGroup::scaleTypeChanged(int index)
|
||||
double scale = (double) a / (double) b;
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().%s.Scale = %f", multiView->getNameInDocument()
|
||||
, scale);
|
||||
//unblock recompute
|
||||
} else {
|
||||
Base::Console().Log("Error - TaskProjGroup::scaleTypeChanged - unknown scale type: %d\n",index);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user