mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
ImageView: fixed image not saved if extension not set (set default png)
This commit is contained in:
@@ -666,6 +666,12 @@ void ImageView::contextMenuEvent(QContextMenuEvent * e)
|
||||
#endif
|
||||
if(!text.isEmpty())
|
||||
{
|
||||
if(QFileInfo(text).suffix() == "")
|
||||
{
|
||||
//use png by default
|
||||
text += ".png";
|
||||
}
|
||||
|
||||
_savedFileName = text;
|
||||
QImage img(_graphicsView->sceneRect().width(), _graphicsView->sceneRect().height(), QImage::Format_ARGB32_Premultiplied);
|
||||
QPainter p(&img);
|
||||
|
||||
Reference in New Issue
Block a user