Commit d184e851 authored by Jan Möbius's avatar Jan Möbius

Add leading zeros to snapshots

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5701 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6cd82c21
......@@ -64,7 +64,7 @@ void CoreWidget::slotCustomContextMenu( const QPoint& _point ) {
// If the menu is not correctly initialized, dont try to show it.
if ( !contextMenu_->isEmpty () )
contextMenu_->exec( popupPosition );
contextMenu_->popup( popupPosition );
}
......
......@@ -193,7 +193,12 @@ void CoreWidget::slotSnapshot() {
QFileInfo fi(PluginFunctions::viewerProperties().snapshotName());
int counter = PluginFunctions::viewerProperties().snapshotCounter();
QString suggest = fi.baseName() + "." + QString::number(counter) + ".";
// Add leading zeros
QString number = QString::number(counter);
while ( number.size() < 7 )
number = "0" + number;
QString suggest = fi.baseName() + "." + number + ".";
QString format="png";
......@@ -234,7 +239,12 @@ void CoreWidget::applicationSnapshotDialog() {
QFileInfo fi(snapshotName_);
QString suggest = fi.baseName() + "." + QString::number(snapshotCounter_) + ".";
// Add leading zeros
QString number = QString::number(snapshotCounter_);
while ( number.size() < 7 )
number = "0" + number;
QString suggest = fi.baseName() + "." + number + ".";
QString format="png";
......@@ -279,7 +289,12 @@ void CoreWidget::applicationSnapshot() {
QFileInfo fi(snapshotName_);
QString suggest = fi.path() + QDir::separator() +fi.baseName() + "." + QString::number(snapshotCounter_++) + ".";
// Add leading zeros
QString number = QString::number(snapshotCounter_++);
while ( number.size() < 7 )
number = "0" + number;
QString suggest = fi.path() + QDir::separator() +fi.baseName() + "." + number + ".";
QString format="png";
......@@ -304,7 +319,12 @@ void CoreWidget::viewerSnapshotDialog() {
QFileInfo fi(snapshotName_);
QString suggest = fi.baseName() + "." + QString::number(snapshotCounter_) + ".";
// Add leading zeros
QString number = QString::number(snapshotCounter_);
while ( number.size() < 7 )
number = "0" + number;
QString suggest = fi.baseName() + "." + number + ".";
QString format="png";
......@@ -410,7 +430,12 @@ void CoreWidget::viewerSnapshot() {
QFileInfo fi(snapshotName_);
QString suggest = fi.path() + QDir::separator() +fi.baseName() + "." + QString::number(snapshotCounter_++) + ".";
// Add leading zeros
QString number = QString::number(snapshotCounter_++);
while ( number.size() < 7 )
number = "0" + number;
QString suggest = fi.path() + QDir::separator() +fi.baseName() + "." + number + ".";
QString format="png";
......
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