src/toolsets/viewtoolset.cpp

changeset 1332
1fffb24d4ffe
parent 1326
69a90bd2dba2
child 1369
1e2391b78d17
equal deleted inserted replaced
1331:f10b0c32a85d 1332:1fffb24d4ffe
114 void ViewToolset::screenshot() 114 void ViewToolset::screenshot()
115 { 115 {
116 const char* imageFormats = "PNG images (*.png);;JPG images (*.jpg);;BMP images (*.bmp);;" 116 const char* imageFormats = "PNG images (*.png);;JPG images (*.jpg);;BMP images (*.bmp);;"
117 "PPM images (*.ppm);;X11 Bitmaps (*.xbm);;X11 Pixmaps (*.xpm);;All Files (*.*)"; 117 "PPM images (*.ppm);;X11 Bitmaps (*.xbm);;X11 Pixmaps (*.xpm);;All Files (*.*)";
118 QImage image = m_window->renderer()->screenCapture(); 118 QImage image = m_window->renderer()->screenCapture();
119 QString root = Basename (currentDocument()->name()); 119 QString root = QFileInfo {currentDocument()->name()}.fileName();
120 120
121 if (root.right (4) == ".dat") 121 if (root.right (4) == ".dat")
122 root.chop (4); 122 root.chop (4);
123 123
124 QString defaultname = (not root.isEmpty()) ? format ("%1.png", root) : ""; 124 QString defaultname = (not root.isEmpty()) ? format ("%1.png", root) : "";

mercurial