[Libreoffice-commits] core.git: vcl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 19 10:46:14 UTC 2021
vcl/source/window/printdlg.cxx | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
New commits:
commit ae8ae3a7fe64db2d309773cd645d9ac5c52bfee6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 19 10:27:52 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed May 19 12:45:27 2021 +0200
update printer dialog once on radiobutton toggle
just once on a toggle event, not twice for each button of the group
Change-Id: I8586ad5d9127349dce28cb5a9b66dbe0f803164c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115791
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 87f77300fb16..de96ea5d28df 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -695,7 +695,7 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const std::shared_ptr<PrinterC
mxReverseOrderBox->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
mxCollateBox->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
mxSingleJobsBox->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
- mxPagesBtn->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
+ mxBrochureBtn->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
// setup select hdl
mxPrinters->connect_changed( LINK( this, PrintDialog, SelectHdl ) );
@@ -1517,7 +1517,6 @@ void PrintDialog::setupOptionalUI()
pVal->Value >>= bVal;
mxBrochureBtn->set_active( bVal );
mxBrochureBtn->set_sensitive( maPController->isUIOptionEnabled( aPropertyName ) && pVal != nullptr );
- mxBrochureBtn->connect_toggled( LINK( this, PrintDialog, ToggleHdl ) );
maPropertyToWindowMap[aPropertyName].emplace_back(mxBrochureBtn.get());
maControlToPropertyMap[mxBrochureBtn.get()] = aPropertyName;
@@ -1843,9 +1842,9 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::ToggleButton&, rButton, void)
makeAny( bChecked ) );
maUpdatePreviewIdle.Start();
}
- else if( &rButton == mxBrochureBtn.get() )
+ else if (&rButton == mxBrochureBtn.get())
{
- PropertyValue* pVal = getValueForWindow( &rButton );
+ PropertyValue* pVal = getValueForWindow(mxBrochureBtn.get());
if( pVal )
{
bool bVal = mxBrochureBtn->get_active();
@@ -1856,7 +1855,7 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::ToggleButton&, rButton, void)
// update preview and page settings
maUpdatePreviewNoCacheIdle.Start();
}
- if( mxBrochureBtn->get_active() )
+ if (mxBrochureBtn->get_active())
{
mxOrientationBox->set_sensitive( false );
mxOrientationBox->set_active( ORIENTATION_LANDSCAPE );
@@ -1865,13 +1864,14 @@ IMPL_LINK(PrintDialog, ToggleHdl, weld::ToggleButton&, rButton, void)
showAdvancedControls( false );
enableNupControls( false );
}
- }
- else if( &rButton == mxPagesBtn.get() )
- {
- mxOrientationBox->set_sensitive( true );
- mxOrientationBox->set_active( ORIENTATION_AUTOMATIC );
- enableNupControls( true );
- updateNupFromPages();
+ else
+ {
+ mxOrientationBox->set_sensitive( true );
+ mxOrientationBox->set_active( ORIENTATION_AUTOMATIC );
+ enableNupControls( true );
+ updateNupFromPages();
+ }
+
}
}
More information about the Libreoffice-commits
mailing list